/**
 * 物料车管理api
 */
import request from '@/utils/request'

export function getInfo(data) {
  return request({
    url: '/wms/material/cart/page',
    method: 'post',
    data
  })
}

export function add(data) {
  return request({
    url: '/wms/material/cart',
    method: 'post',
    data
  })
}

export function update(id, data) {
  return request({
    url: `/wms/material/cart/${id}`,
    method: 'put',
    data
  })
}

export function deleteInfo(id) {
  return request({
    url: `/wms/material/cart/${id}`,
    method: 'delete'
  })
}

export function apply(id) {
  return request({
    url: `/wms/material/cart/apply/${id}`,
    method: 'post'
  })
}

export function showQR(id) {
  return request({
    url: `/wms/material/cart/qrCode/${id}`,
    method: 'get',
    responseType: 'blob'
  })
}

